<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/layui/css/layui.css"media="all">
</head>
<body>


<table class="layui-table">
  <colgroup>
    <col width="150">
    <col width="200">
    <col>
  </colgroup>
  <thead>
    <tr>
      <th>服务器</th>
      <th>用户总数</th>
      <th>付费用户</th>
      <th>付费率</th>
      <th>在线人数</th> 
      <th>日活跃</th>
      <th>月活跃</th>
      <th>总收入(<%=ret.setting.mName%>)</th>
      <% if(ret.auth&&ret.auth.inner){%>
      <th>折合(<%=ret.setting.rate%>)/RMB</th>
      <th>最终分成(<%=ret.setting.offset%>)/RMB</th>
      <%}%>
    </tr> 
  </thead>
  <tbody>



  <% let total={sname:"总计",num:0,pnum:0,tnum:0,anum:0,income:0,online:0} %>
  <% for(let i=0;i<ret.server.length;++i){ %>
  <tr>
  <td><%=ret.server[i].sname%></td>
  <td><%=ret.server[i].num%></td>
  <td><%=ret.server[i].pnum%></td>
  <td><%=((ret.server[i].pnum/ret.server[i].num)*100).toFixed(2)%>%</td>
  <td><%=ret.server[i].online%></td>
  <td><%=ret.server[i].tnum%></td>
  <td><%=ret.server[i].anum%></td>
  <td><%=ret.server[i].income%></td>
  <% if(ret.auth&&ret.auth.inner){%>
  <td><%=(ret.server[i].income*ret.setting.rate).toFixed(0)%></td>
  <td><%=(ret.server[i].income*ret.setting.rate*ret.setting.offset).toFixed(0)%></td>
  <%}%>
  </tr>
  <% total.num+=ret.server[i].num %>
  <% total.pnum+=ret.server[i].pnum %>
  <% total.online+=ret.server[i].online %>
  <% total.tnum+=ret.server[i].tnum %>
  <% total.anum+=ret.server[i].anum %>
  <% total.income+=ret.server[i].income %>
  <%}%>
  <tr> 
	<td><%=total.sname%></td> 
	<td><%=total.num%></td>
	<td><%=total.pnum%></td>
	<td><%=((total.pnum/total.num)*100).toFixed(2)%>%</td>
  <td><%=total.online%></td>
  <td><%=total.tnum%></td>
	<td><%=total.anum%></td>
	<td><%=total.income%></td>
  <% if(ret.auth&&ret.auth.inner){%>
  <td><%=(total.income*ret.setting.rate).toFixed(0)%></td>
  <td><%=(total.income*ret.setting.rate*ret.setting.offset).toFixed(0)%></td>
  <%}%>
  </tr>


 
 </tbody>
</table>

<!-- <button class="layui-btn">刷新</button> -->

<blockquote class="layui-elem-quote layui-quote-nm">对游戏服有一定消耗，不要频繁刷新</blockquote>



<script src="/layui/layui.js"></script>
<script>
    layui.config({
        base: '/webui/'  // 模块目录
    }).extend({
        "cosjs":"{/}/layui/?name=cosjs",
    }).use(['form','cosjs'], function () {
        let form = layui.form,cosjs=layui.cosjs,$ = layui.jquery;
         // let _ret=<%-JSON.stringify(ret)%>;
         // console.log(_ret)
    });
</script>
</body>
</html>